Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

37
Vistas
Error [ERR_REQUIRE_ESM] ES module require() is not supported

Developed a Shopify Remix app prior to template migration to Vite. There is a library @shopify/polaris-viz that I am using for graphics. However, it was constantly throwing the ERR_REQUIRE_ESM string-width error when trying to run the project. It was later fixed using serverDependenciesToBundle as suggested here . However, I'm now having trouble migrating this to the Vite implementation. Since remix.config.ts no longer exists what should be the best way to handle the following error?

 require() of ES Module /app/node_modules/d3-scale/src/index.js from /app/node_modules/@shopify/polaris-viz-core/build/cjs/utilities/createGradient.js not supported.
Instead change the require of index.js in /app/node_modules/@shopify/polaris-viz-core/build/cjs/utilities/createGradient.js to a dynamic import() which is available in all CommonJS modules.

Looking at threads 7872 and 7865 in the official remix repository doesn't seem to be working. As suggested in 7865, I put the wrong package, in this case d3-scale in ssr -> noExternal but this doesn't seem to be working.

 ssr: {
 noExternal: ["d3-scale"]
}

Steps to reproduce the issue:

  1. Set up a new project

  2. Add @shopify/polaris-viz to the project

  3. import { PolarisVizProvider } from "@shopify/polaris-viz";

Any help with this is greatly appreciated.

over 2 years ago · Carlos Garzón Colorado
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda